package com.company.modeldesign;

public class ParkingSystem {


    int[] remainPark = new int[4];

    public ParkingSystem(int big, int medium, int small) {
        remainPark[1] = big;
        remainPark[2] = medium;
        remainPark[3] = small;
    }

    public boolean addCar(int carType) {
        int remain = remainPark[carType];
        if (remain == 0) {
            return false;
        }
        remainPark[carType] = remain - 1;
        return true;
    }
}
